<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="jquery-3.3.1.min.js"></script>
	<style>
		.one{
			/*超出隐藏*/
			overflow: hidden;
			/*省略号*/
			text-overflow: ellipsis;
			/*不换行*/
			white-space: nowrap;
		}
		#wrapper{
			width: 200px;
			height: 80px;
		}
	</style>
	<script>
		$(function(){
            var divH = $("#wrapper").height();
            var $p = $("p", $("#wrapper")).eq(0);
            while ($p.outerHeight() > divH) {
                $p.text($p.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "..."));
            };
		})
	</script>
</head>
<body>
	<div id="wrapper">
		<p>烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦发烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦烦发大苏打实打实大苏打实打实大苏打实打实的</p>
	</div>
</body>
</html>